package meterMonitor.biz;

import meterMonitor.mapper.MeterMapper;
import meterMonitor.mapper.UserMapper;
import meterMonitor.model.Meter;
import meterMonitor.model.User;
import meterMonitor.vo.Page;
import meterMonitor.vo.QueryUserRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by admin on 2019/1/3.
 */
@Service
public class UserBiz extends  BaseBiz {

    @Autowired
    private UserMapper mapper;
   public List<User> queryUser(QueryUserRequest request,Page page){
       // return mapper.queryPage(condition);
       int totalCount = mapper.queryCount(request);
       page.setTotalCount(totalCount);
       return mapper.queryPage(request, page);
    }


//    public void saveMeter(Meter meterMod){
//        if(meterMod.getPkid()==null){
//            this.meterMapper.insertSelective(meterMod);
//        }else {
//            this.meterMapper.updateByPrimaryKeySelective(meterMod);
//        }
//    }
}
